#include <iostream>
#include <sys/time.h>

int main (void)
{
	struct timeval tv;

	gettimeofday(&tv, NULL);
	
	unsigned long long startTimeInMilisec = ((((unsigned long long)tv.tv_sec) * 1000) +
		(((unsigned long long)tv.tv_usec) / 1000));
		  
	std::cout << "pulse enter para continuar..." << std::endl;    
	std::cin.get();
		      
	gettimeofday(&tv, NULL);
		      
    unsigned long long stopTimeInMilisec = ((((unsigned long long)tv.tv_sec) * 1000) +
		(((unsigned long long)tv.tv_usec) / 1000));
		    
	std::cout << "tiempo transcurrido: " << stopTimeInMilisec - startTimeInMilisec << " ms" << std::endl;
		    
    return 0;
}
